<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>v-once</title>
</head>
<body>

<!-- v-once只编译一次，显示内容之后不再具有响应式功能 -->
<div id="app">
  <div v-once>{{msg}}</div>
  <div>{{msg}}</div>
</div>

<script src="../lib/vue.js"></script>
<script>
  let vm = new Vue({
    el: '#app',
    data: {
      msg: 'Hello World'
    }
  })
</script>
</body>
</html>